How WooCommerce search by sku works with MultiSite Global Search
The WooCommerce Multisite Global Search is a key functionality that implements global searching across all shops in the network. The plugin works out of the box, after code activation. The WooComerce search widget ( or any search query which sets the post type to products) returns products from all sites, using the default theme search interface.
The plugin core extends the default WooCommerce search functionality which is a robust and fast process. It searches within products titles, content and excerpt against provided search keywords or phrase.
The WooCommerce Multisite Global Search comes with a better algorithm workflow. This allows searching within products metadata ( like SKU, Color, Location etc ) which greatly increases the search engine spread on the network, by returning an exhaustive list of products that make a better match to the search criteria.
For optimal performance, the meta fields that the plugin should also look into, need to be specified through a constant within the wp-conflig.php file, in the following example it also searches for _sku and _info fields values:
define ( 'WooMultiSeearch_MetaKeys', array ( '_sku', '_info' ) );
Optionally, the engine can search inside variations. This can be also specified through a constant within the wp-config.php file as follows:
define ( 'WooMultiSeearch_ReturnVariations', TRUE );
When searching also the products variations, the main products can hide ( if that include at least one variable item ):
define ( 'WooMultiSeearch_IfVariationsHideMainProduct', TRUE );